package com.xsj.tool;

import com.pll.pojo.Merchant;
import com.xsj.bean.MerchantQuery;
import com.xsj.mapper.AiCatMapper;
import lombok.RequiredArgsConstructor;
import org.springframework.ai.tool.annotation.Tool;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * @ClassName ClassifyTools
 * @Description TODO
 * @Author 小鹿
 * @Date 2025/6/18 22:40
 */
@Component
@RequiredArgsConstructor
public class MerchantTools
{

    private final AiCatMapper aiCatMapper;

    @Tool( description = "获取所有商户信息")
    public List<Merchant> getMerchantList()
    {
        return aiCatMapper.getMerchantList();
    }

    @Tool(description = "根据条件查询商户信息")
    public List<Merchant> queryMerchants(MerchantQuery query) {
        return aiCatMapper.queryMerchants(query);
    }
}